<%@ Language=VBScript%> <% wantSub = Request.QueryString( "sub" ) wantMain = Request.QueryString( "main" ) wantID = Request.QueryString( "ID" ) if wantMain = "" then Response.Redirect ( "index.asp" ) end if if wantSub = "" then image = wantMain else image = wantSub end if isDefault = ( wantMain = "non-www" and wantSub = "info") or ( wantMain = "www" and wantSub = "info" ) or ( wantMain = "info" and wantSub = "aboutspeedway" ) or ( wantsub="" ) connstr = f_getConnString( server.MapPath( "databas/db1.mdb" ) ) %> SPEEDWAY DIGITAL ARMY <% showTopMenu %>
<% select case wantMain ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' case "news" if wantID = "" then sql = "SELECT news.newsID AS newsID, news.newsDate AS dte, news.header AS header "&_ "FROM news "&_ "ORDER BY news.newsDate DESC" rs.Open sql, connStr Response.Write( "" ) while not rs.EOF dte = rs( "dte" ) if rs( "header" ) <> "" and dte <> "" then %> <% end if rs.MoveNext() wend Response.Write "

<%= day( dte ) & "/" & month( dte ) %>
"><%= rs( "header" )%>



" else sql = "SELECT "&_ "links.linkURL AS url, "&_ "links.linkText AS lnkTxt, "&_ "news.newsID AS newsID, "&_ "news.newsDate AS dte, "&_ "news.header AS header, "&_ "news.newsText AS body "&_ "FROM news INNER JOIN links ON news.newsID = links.newsID "&_ "ORDER BY news.newsDate DESC" rs.Open sql, connstr, 1 IDRef = "newsID" '***************************** rs.MoveLast() lastID = rs( IDRef ) rs.MoveFirst() firstID = rs( IDRef ) rs.Find IDRef & " = " & wantID '***************************** if not rs.EOF Then %> <%= day( rs( "dte" ) ) & "/" & month( rs( "dte" ) ) %> | <%= uCase( rs( "header" ) ) %>



<%= rs( "body" ) %>

<% call showNavigation( "news" ) end if end if ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' case "info" if isDefault then Response.Write( f_readFile( "inc/info_index.txt" ) ) else Response.Write( f_readFile( "inc/eotm.txt" ) ) end if ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' case "www", "non-www" category = wantMain & "_" & wantSub '''''''''''''''''''''''''''''' if isDefault then Response.Write( f_readFile( "inc/" & wantMain & "_index.txt" ) ) '''''''''''''''''''''''''''''' elseif wantID = "" then sql = "SELECT clients.clientName AS client, work.indexText AS indxTxt, work.header AS projName, work.workID AS workID "&_ "FROM categories INNER JOIN (clients INNER JOIN work ON clients.clientID = work.clientID) ON categories.categoryID = work.categoryID "&_ "WHERE categories.categoryName = '" & category & "' "&_ "ORDER BY clients.clientName, work.header" rs.Open sql, connstr Response.Write( "" ) projCount = 0 while not rs.EOF client = trim( rs( "client" ) ) if lastClient <> client then projCount = 0 else projCount = projCount + 1 end if if lastClient <> "" and projCount = 0 then %> <% end if if lastClient <> client then %>



<%= uCase( client ) %> <% end if Response.Write( "" ) if isNull( rs( "indxTxt" ) ) or trim( rs( "indxTxt" ) ) = "" then Response.Write( f_toTitleCase( rs( "projName" ) ) ) else Response.Write( rs( "indxTxt" ) ) end if Response.Write( "
" ) lastClient = trim( rs( "client" ) ) rs.MoveNext() wend %>



<% rs.Close() else sql = "SELECT "&_ "clients.clientName AS client, "&_ "links.linkURL AS url, "&_ "links.linkText AS lnkTxt, "&_ "links.linkID AS linkID, "&_ "links.workID AS workID, "&_ "work.header AS header, "&_ "work.infoText AS body, "&_ "work.image AS img "&_ "FROM categories INNER JOIN ((clients INNER JOIN work ON clients.clientID = work.clientID) INNER JOIN links ON work.workID = links.workID) ON categories.categoryID = work.categoryID "&_ "WHERE categories.categoryName = '" & category & "' "&_ "ORDER BY clients.clientName, work.header, links.linkID" rs.Open sql, connstr, 1 IDRef = "workID" '***************************** rs.MoveLast() lastID = rs( IDRef ) rs.MoveFirst() firstID = rs( IDRef ) rs.Find IDRef & " = " & wantID '***************************** if not rs.EOF Then %> <%= uCase( rs( "header" ) ) %>
<% if category <> "www_projects" then %> Client: <%= rs( "client" ) %>
<% end if %>


<% if not isNull( rs( "img" ) ) and trim( rs( "img" ) ) <> "" then %>
<%= rs( "body" ) %> <% call showNavigation( "" ) %> " width=92 height=90 border=0>
<% else %> <%= rs( "body" ) %> <% call showNavigation( "" ) %> <% end if %> <% end if rs.Close() end if ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' case "clientlist" Response.Write( f_readFile( "inc/clientlist.txt" ) ) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' case "contact" Response.Write( f_readFile( "inc/contact.txt" ) ) end select if ( isDefault and wantMain <> "news" ) or ( wantID <> "" ) then Response.Write "
" Response.Write "
" end if %>